<script setup>
let props = defineProps({
  control: Object,
  formProps: Object,
  enData: Object
})

</script>

<template>
  <el-form label-width="90px">
    <el-form-item label="中文名称">
      <el-input v-model="control.props.label" placeholder="请输入中文名称"></el-input>
    </el-form-item>
    <el-form-item label="英文名称">
      <el-select v-if="props.enData?.options?.length" v-model="control.props.enName" placeholder="请选择英文名称"
                 style="width: 100%">
        <el-option
            v-for="(item, index) in props.enData.options"
            :key="index"
            :label="item[props.enData.label]"
            :value="item[props.enData.value]"
        />
      </el-select>
      <el-input v-else v-model="control.props.enName" placeholder="请输入英文名称"></el-input>
    </el-form-item>

    <el-form-item label="显示内容">
      <el-input type="textarea" v-model="control.props.content" clearable placeholder="请输入显示内容"></el-input>
    </el-form-item>

    <el-form-item label="字体大小">
      <el-select v-model="control.props.fontSize" placeholder="请选择字体大小" style="width: 100%">
        <el-option label="12px" value="12px"/>
        <el-option label="14px" value="14px"/>
        <el-option label="16px" value="16px"/>
        <el-option label="18px" value="18px"/>
        <el-option label="20px" value="20px"/>
      </el-select>
    </el-form-item>
    <el-form-item label="字体类型">
      <el-select v-model="control.props.fontType" placeholder="请选择字体类型" style="width: 100%">
        <el-option label="宋体" value="SimSun"/>
        <el-option label="微软雅黑" value="Microsoft YaHei"/>
      </el-select>
    </el-form-item>
    <el-form-item label="文本加粗">
      <el-select v-model="control.props.fontBold" placeholder="请选择是否加粗" style="width: 100%">
        <el-option label="是" value="1"/>
        <el-option label="否" value="0"/>
      </el-select>
    </el-form-item>
    <el-form-item label="字体颜色">
      <el-color-picker v-model="control.props.fontColor"/>
    </el-form-item>
    <el-form-item label="描述信息">
      <el-input type="textarea" rows="5" v-model="control.props.remark" placeholder="请输入描述信息"></el-input>
    </el-form-item>
    <!--        <el-form-item label="宽度">-->
    <!--            <el-slider-->
    <!--                class="w-11/12"-->
    <!--                :min="0"-->
    <!--                :max="formProps.cols"-->
    <!--                show-stops-->
    <!--                v-model="control.props.width"-->
    <!--            ></el-slider>-->
    <!--        </el-form-item>-->

    <!--        <el-form-item label="显示标题">-->
    <!--            <el-switch v-model="control.props.showLabel"></el-switch>-->
    <!--        </el-form-item>-->
    <!--        <el-form-item label="标题宽度">-->
    <!--            <el-input-number v-model="control.props.labelWidth" :min="0" />-->
    <!--        </el-form-item>-->
  </el-form>
</template>
